import request from '@/utils/request'

/**
 * 获取链接列表
 */
export const getAdvLinkListApi = data => {
  return request({
    method: 'get',
    url: '/ydd_link/list',
    params: data
  })
}

/**
 * 删除
 */
export const delAdvLinkApi = id => {
  return request({
    method: 'get',
    url: `/ydd_link/del?id=${id}`
  })
}

/**
 * 新增
 */
export const addAdvLinkApi = data => {
  return request({
    method: 'post',
    url: '/ydd_link/add',
    data
  })
}

/**
 * 详情回显
 */
export const getAdvLinkDetailApi = id => {
  return request({
    method: 'get',
    url: `/ydd_link/rowInfo?id=${id}`
  })
}

/**
 * 修改
 */

export const editAdvLinkApi = data => {
  return request({
    method: 'post',
    url: '/ydd_link/update',
    data
  })
}
